#ifndef QUERY_H
#define QUERY_H

#include <QString>
#include <QList>

#define DEFAULTSQL 1

class Query
{
public:
    Query(){};
    Query(QString query);
    Query(const Query& other) {
        this->m_query = other.m_query;
        this->m_where = other.m_where;
        this->m_orderBy = other.m_orderBy;
        this->m_limit = other.m_limit;
        this->m_offset = other.m_offset;
    }

    Query where(QString where);
    Query orderBy(QString order);
    Query limit(unsigned long limit);
    Query offset(unsigned long offset);

    QString build();

private:
    QString m_query;
    QList<QString> m_where;
    QList<QString> m_orderBy;
    unsigned long m_limit;
    unsigned long m_offset;
};

#endif // QUERY_H
